package com.fc.mall.decoration.page.object;

import com.fc.mall.decoration.widget.object.PageWidget;
import com.fc.mall.validation.constraints.NullOrNotBlank;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.joda.time.DateTime;

import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.util.List;

@Getter
@Setter
public class CustomPageUpdate {
    @NullOrNotBlank
    @Size(min = 1, max = 60)
    private String name;

    @NullOrNotBlank
    @Size(min = 1, max = 128)
    private String description;

    private PageStatus status;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private DateTime activeTime;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private DateTime expireTime;

    private Boolean isDefault;

    @Valid
    private List<PageWidget> pageWidgets;
}
